import http from "@/api";
import { ResPage } from "@/api/interface";
import { ApiSysMenuCreate, ApiSysMenuDelete, ApiSysMenuSearch, ApiSysMenuUpdate } from "@/api/apis/sys_menu";
import { ReqSearch } from "@/api/interface/Search/ReqSearch";
import { dtoSysMenuCreate, dtoSysMenuDelete, dtoSysMenuInfo, dtoSysMenuUpdate } from "@/api/dbdto/dtoSysMenu";

export const requestSysMenuCreate = (params: dtoSysMenuCreate) => {
  return http.post(ApiSysMenuCreate, params);
};

export const requestSysMenuSearch = (params: ReqSearch) => {
  return http.post<ResPage<dtoSysMenuInfo>>(ApiSysMenuSearch, params);
};

export const requestSysMenuUpdate = (params: dtoSysMenuUpdate) => {
  return http.post(ApiSysMenuUpdate, params);
};

export const requestSysMenuDelete = (params: dtoSysMenuDelete) => {
  return http.post(ApiSysMenuDelete, params);
};
